package com.yy.web.pm.billboard.controller;

import com.yy.web.pm.billboard.domain.BillboardData;
import com.yy.web.pm.billboard.domain.Dto.BillboardDto;
import com.yy.web.pm.billboard.service.BillboardDataService;
import com.yy.web.pm.until.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/billboard")
public class BillboardController {
    @Qualifier("billboardDataServiceImpl")
    @Autowired
    private BillboardDataService billboardService;

    // 广告牌到期通知接口
    @GetMapping("billboard/time")
    public Result billboardExpire(BillboardData billboardData) {
        billboardService.UpdateBillBoardExpire(billboardData);
        return Result.success("到期通知发送成功");
    }

    //第三方检测机构处理商家提交的广告牌处理数据
    @PostMapping("billboard/update")
    public Result billboardUpdate(@RequestBody BillboardData billboardDto) {
        billboardService.UpdateBillBoard(billboardDto);
        return Result.success("检测完成");

    }

}
